ARCH = $(shell getconf LONG_BIT)
ifeq ($(ARCH),64) 
  Target = libwsvcleida-x64.so
else
  Target = libwsvcleida.so
endif

object=ldservice.o utf8.o ucs2gb.o json_util.o functions.o

wsvcleida:$(object)
	gcc -fPIC -shared -Wl,-hash-style=sysv -o $(Target) $(object)

functions.o: ../functions.c
	gcc -c -fPIC -shared -Wall ../functions.c

%.o:%.c
	gcc -c -fPIC -shared -Wall $< -o $@
		
clean:
	rm -f *.o $(Target)
